package com.lovo.service.impl;

import com.lovo.bean.Type;
import com.lovo.dao.TypeMapper;
import com.lovo.service.ITypeService;
import com.lovo.util.SqlSessionUtil;
import org.apache.ibatis.session.SqlSession;

import java.util.List;

public class TypeServiceImpl implements ITypeService {
    @Override
    public List<Type> getTypeList() {

        SqlSession sqlSession = SqlSessionUtil.getSqlSession();
        TypeMapper mapper = sqlSession.getMapper(TypeMapper.class);
        List<Type> typeList = mapper.getTypeList();
        SqlSessionUtil.commit();
        return typeList;
    }
}
